#include "work2.h"
#include "ui_work2.h"
#include "up_goods.h"
#include "search_good.h"
#include "delete_good.h"
#include "mainwindow.h"
#include "main.h"
#include "client_mode.h"
work2::work2(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::work2)
{
    ui->setupUi(this);
}

work2::~work2()
{
    delete ui;
}

void work2::on_pushButton_2_clicked()
{
    if(users==1){
        up_goods *new_window;
        new_window = new up_goods;
        new_window->show();
    }else{
        client_mode *add_o;
        add_o = new client_mode;
        add_o->show();
    }

}

void work2::on_pushButton_3_clicked()
{
    search_good *new_window;
    new_window = new search_good;
    new_window->show();
}

void work2::on_pushButton_4_clicked()
{
    if(users==1){
        delete_good *new_window;
        new_window = new delete_good;
        new_window->show();
    }else{
        client_mode *add_o;
        add_o = new client_mode;
        add_o->show();
    }

}
